#ifndef API_API_H
#define API_API_H

#include <HTTPClient.h>
#include <ArduinoJson.h>
#include "api_data.h"
#include "../error/error.h"

namespace Api
{

    class Weather
    {

    protected:
        // char apiUrl[70] = "https://xsbqx6dzqzihycv332wbkk4epy0ykdpy.lambda-url.us-west-1.on.aws/";
        char apiUrl[139] = "https://api.openweathermap.org/data/3.0/onecall?lat=31.8228094&lon=117.2218033&lang=en&units=metric&appid=0ca6fc7dd5a1def4853c1e11f7288402";
        DynamicJsonDocument doc = DynamicJsonDocument(30000);
        

    public:
        void call();
        Data getData();
    };

}

#endif